<?php /* Smarty version 2.6.16, created on 2013-09-06 17:06:07
         compiled from ../templates/admin/manageleads/upload_codes.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_start'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
  echo '<script language="javascript" type="text/javascript" src="';  echo $this->_tpl_vars['siteroot'];  echo '/includes/js/common.js"></script>'; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['header_end'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</script>
<?php echo '
<script type="text/javascript">


function validationFile(){

	if(isWhitespace(document.getElementById("importfile").value) == true) {
		
		document.getElementById("import-file").innerHTML = "Please browse the file to import!";
		document.getElementById("importfile").focus();
		return false;
	} else {
		document.getElementById("import-file").innerHTML = "";
	}	
	if(document.getElementById("importfile").value!="")
	{
		var filename = document.getElementById("importfile").value;
		var filelength = parseInt(filename.length) - 4;
		var fileext = filename.substring(filelength,filelength + 4);		 
		if(  (fileext.toLowerCase()!= ".xls") && (fileext.toLowerCase()!= "xlsx")  )
		{
			document.getElementById("import-file").innerHTML = "You Can Upload Only  xls or xlsx file format!";			 
			return false;
		}
	}
	return true;
}

</script>
'; ?>

 <div class="contain">
      <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['left_menu'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      <div class="right_contain">
         <div class="heading_box">Import Leads Price</div>
         <div class="whitebox">
         <!--Message Div Start-->
         <?php if ($this->_tpl_vars['msg']): ?>
         <div class="masg_div">
           <?php echo $this->_tpl_vars['msg']; ?>

         </div>
         <?php endif; ?>
         <!--Message Div End-->
         <form name="frmAddCity" id="frmAddCity" action="" method="post" enctype="multipart/form-data" onSubmit="return validationFile()"> 
         <div style="min-height:250px;">
          <!--Form Contain start-->
           
           <div class="form_fieldbox">
          
                        
             <dl>
              <dt>Import Leads :<span class="error">*</span></dt>
              <dd><input type="file" class="input" name="importfile" id="importfile" value="<?php echo $_POST['importfile']; ?>
"/></dd>
              <div class="clear"></div>
             
             </dl>
             <dl>
              <dt>&nbsp;<span class="error"></span></dt>
              <dd> <div id="import-file" style="color:red;"></div></dd>
              <div class="clear"></div>
              <div id="import-file" class="color:red;"></div>
             </dl>
             <dl>
              <dt>Import Format File:<span class="error">*</span></dt>
              <dd>Excel Sheet should be in the specified format :</span> <a class="link" href="<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/manageleads/download_format.php">Click here to download the excel sheet format </a></dd>
              <div class="clear"></div>
             </dl>
              <dt>&nbsp;</dt>
              <div class="clear"></div>
             </dl>
            </div>
           <!--Form Contain end--> 
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="addcity_btn" id="addcity_btn" /></span>
            <span><input type="button" class="admin_btn" value="Cancel" onclick="window.location='<?php echo $this->_tpl_vars['siteroot']; ?>
/admin/home.php?q=leads&page=<?php echo $_GET['page']; ?>
';"/></span>
           </div>
            <!--Button here end-->
         </div>
         </form>
         </div>
        </div>
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footer'], 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>